<template>
    <div>
        <van-nav-bar title="设置密码" left-text="返回" left-arrow >
            <template #right>
                跳过
            </template>
        </van-nav-bar>
         <van-field
            v-model="smscode"
            name="验证码"
            label="验证码"
            placeholder="验证码"
            :rules="[{ required: true, message: '请填写验证码' }]"
        />
        <van-field
            v-model="password"
            type="password"
            name="密码"
            label="密码"
            placeholder="密码"
            :rules="[{ required: true, message: '请填写密码' }]"
        />
        <div style="margin: 16px;">
            <van-button round block type="info" @click="goLogin">提交</van-button>
        </div>
    </div>
</template>

<script>
    import { Field,Button,NavBar } from "vant";
    import { secondPassword } from "../../request/http";
    export default {
       name:"setpass" ,
       components:{
           [Field.name]:Field,
           [Button.name]:Button,
           [NavBar.name]:NavBar,
       },
       data(){
           return {
               smscode:"",
               password:""
           }
       },
       methods:{
           goLogin(){
             secondPassword({
                 mobile:18511904833,
                 sms_code:parseInt(this.smscode),
                 password:this.password
             }).then(res=>{
                 console.log(res)

             })

           }
       }

    }
</script>

<style lang="scss" scoped>

</style>